Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdk: lower compile times too by using async_trait less #3880

Closed
wants to merge 3 commits into from

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Aug 22, 2024

This one is slightly more controversial than #3879, since it makes the code slightly less legible. But it's pretty sweet in that it also divides the compiles times of matrix-sdk by more than two on my machine, from 33 seconds to 12 seconds.

With this PR and #3879, the overall build time for multiverse goes from 113 seconds (cold build cache) down to 65 seconds (cold build cache too).

See also: rust-lang/rust#87012

Who has two thumbs and wants to make a trait not use async_trait, and
thus get rid of trait object safety?
@bnjbvr bnjbvr requested a review from a team as a code owner August 22, 2024 12:22
@bnjbvr bnjbvr requested review from Hywan and removed request for a team August 22, 2024 12:22
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 87.35632% with 11 lines in your changes missing coverage. Please review.

Project coverage is 84.05%. Comparing base (b95c189) to head (1dbd6aa).
Report is 2 commits behind head on main.

Files Patch % Lines
crates/matrix-sdk/src/event_cache/paginator.rs 87.67% 9 Missing ⚠️
crates/matrix-sdk/src/room/edit.rs 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3880      +/-   ##
==========================================
- Coverage   84.10%   84.05%   -0.05%     
==========================================
  Files         266      266              
  Lines       27724    27738      +14     
==========================================
- Hits        23317    23316       -1     
- Misses       4407     4422      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This divides compile times for matrix-sdk by 2, on my machine (33
seconds -> 16).
@bnjbvr bnjbvr force-pushed the bnjbvr/lower-compile-times-sdk branch from fd287fd to 1dbd6aa Compare August 22, 2024 12:44
@bnjbvr
Copy link
Member Author

bnjbvr commented Aug 22, 2024

Will fold with the other PR.

@bnjbvr bnjbvr closed this Aug 22, 2024
@bnjbvr bnjbvr deleted the bnjbvr/lower-compile-times-sdk branch August 22, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant